﻿using System;

namespace LuckyBingoRcon.Matches
{
    public class Map : IMap
    {
        private string mapName = null;
		private string prettyName = null;
        private string abbrev = null;
        private MapLookup mapLookUp = null;

        public Map() { }

        public Map(string mapName, string prettyName, string abbrev)
        {
            if (String.IsNullOrEmpty(mapName) || String.IsNullOrEmpty(prettyName) || String.IsNullOrEmpty(abbrev))
            {
                throw new ArgumentException("Map name may not be null nor empty.");
            }

            this.mapName = mapName;
            this.prettyName = prettyName;
            this.abbrev = abbrev;
        }

        public Map(string mapName, string prettyName, string abbrev, MapLookup mlu)
        {
            if (String.IsNullOrEmpty(mapName) || String.IsNullOrEmpty(prettyName) || String.IsNullOrEmpty(abbrev) || mlu == null)
            {
                throw new ArgumentException("Map name and map lookup may not be null nor empty.");
            }

            this.mapName = mapName;
            this.prettyName = prettyName;
            this.abbrev = abbrev;
            this.mapLookUp = mlu;
        }

        /// <summary>
		/// Gets the map name. Does not allow setting.
		/// </summary>
        public string MapName
        {
            get
            {
                return mapName;
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        /// <summary>
        /// Gets the pretty map name. Does not allow setting.
        /// </summary>
        public string PrettyName
        {
            get
            {
                return prettyName;
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        /// <summary>
        /// Gets the abbreviation. Does not allow setting.
        /// </summary>
        public string Abbreviation
        {
            get
            {
                return abbrev;
            }
            set
            {
                throw new NotImplementedException();
            }
        }

		public override string ToString()
		{
			return prettyName;
		}
    }
}
